﻿<span>@T(Res.Name("View"))</span>
<a href="@Url.Action(Loc.Act("Index").Set("view", "grid").Use("sortBy", 
    "sortDesc", "priceFrom", "priceTo", "searchTerm", "sellerID", 
    "categoryID", "supplierID", "itemID", "attributeIDs").Localized())" 
    class="@(Request.QueryParam("view", "grid").Equals("grid") ? "selected" : String.Empty)">@T(Res.Name("AsGrid"))</a>
<span>,</span>
<a href="@Url.Action(Loc.Act("Index").Set("view", "list").Use("sortBy", 
    "sortDesc", "priceFrom", "priceTo", "searchTerm", "sellerID", 
    "categoryID", "supplierID", "itemID", "attributeIDs").Localized())" 
    class="@(Request.QueryParam("view").Equals("list") ? "selected" : String.Empty)">@T(Res.Name("AsList"))</a>
<span class="separator">&middot;</span>
<span>@T(Res.Name("Sort"))</span>
<a href="@Url.Action(Loc.Act("Index").Use("view", 
    "priceFrom", "priceTo", "searchTerm", "sellerID", 
    "categoryID", "supplierID", "itemID", 
    "attributeIDs").Set(new
    {
        sortBy = "date",
        sortDesc = !Request.QueryParam("sortBy").Equals("date") || !Request.QueryParam("sortDesc", true)
    }).Localized())" 
    class="@(Request.QueryParam("sortBy", "date").Equals("date") ? "selected" : String.Empty)">@T(Res.Name("ByDate"))</a>
<span>,</span>
<a href="@Url.Action(Loc.Act("Index").Use("view", 
    "priceFrom", "priceTo", "searchTerm", "sellerID", 
    "categoryID", "supplierID", "itemID", 
    "attributeIDs").Set(new
    {
        sortBy = "rating",
        sortDesc = !Request.QueryParam("sortBy").Equals("rating") || !Request.QueryParam("sortDesc", true)
    }).Localized())" 
    class="@(Request.QueryParam("sortBy").Equals("rating") ? "selected" : String.Empty)">@T(Res.Name("ByRating"))</a>
<span>,</span>
<a href="@Url.Action(Loc.Act("Index").Use("view", 
    "priceFrom", "priceTo", "searchTerm", "sellerID", 
    "categoryID", "supplierID", "itemID", 
    "attributeIDs").Set(new
    {
        sortBy = "price",
        sortDesc = Request.QueryParam("sortBy").Equals("price") && !Request.QueryParam("sortDesc", true)
    }).Localized())" 
    class="@(Request.QueryParam("sortBy").Equals("price") ? "selected" : String.Empty)">@T(Res.Name("ByPrice"))</a>
